package com.util.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

/**
 * Created by chaiyuan on 2017/5/6.
 */
public class LoginValidator extends Validator {
    protected void validate(Controller c){
        validateRequiredString("no", "nameMsg", "请输入编号");
        validateRequiredString("password", "passMsg", "请输入密码");
    }
    protected  void handleError(Controller c){
        c.keepPara("no");
        c.redirect("/index");
    }
}
